<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    x:ClassModifier="internal"
    x:Class="OpenLS.UI.Internals.ResizeThumbResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:UI="clr-namespace:OpenLS.UI"
    xmlns:Internals="clr-namespace:OpenLS.UI.Internals">
    <LinearGradientBrush EndPoint=".9 1" x:Key="b1">
        <GradientStop Offset="0" Color="#C0C6D6" />
        <GradientStop Offset="1" Color="#5574A7" />
    </LinearGradientBrush>

    <Style TargetType="{x:Type Control}" x:Key="anyThumb">
        <Setter Property="Height" Value="10" />
        <Setter Property="Background" Value="{DynamicResource {x:Static UI:OfficeBrushes.ResizeThumbBackgroundKey}}" />
        <Setter Property="BorderBrush" Value="{DynamicResource {x:Static UI:OfficeBrushes.ResizeThumbBorderBrushKey}}" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>
    <Style TargetType="{x:Type Internals:PreviewThumb}" x:Key="bottomThumb" BasedOn="{StaticResource anyThumb}">
        <Setter Property="DockPanel.Dock" Value="Bottom" />
        <Setter Property="Cursor" Value="SizeNS" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Internals:PreviewThumb}">
                    <Border BorderThickness="0 1 0 0" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <Border.Resources>
                            <Style TargetType="{x:Type Rectangle}">
                                <Setter Property="Width" Value="2" />
                                <Setter Property="Height" Value="2" />
                            </Style>

                        </Border.Resources>
                        <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Rectangle  Fill="White">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="3" Y="0" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Fill="{StaticResource b1}">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="2" Y="-1" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle  Fill="White">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="8" Y="0" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Fill="{StaticResource b1}">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="7" Y="-1" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle  Fill="White">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="-2" Y="0" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Fill="{StaticResource b1}">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="-3" Y="-1" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle  Fill="White">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="-7" Y="0" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                            <Rectangle Fill="{StaticResource b1}">
                                <Rectangle.RenderTransform>
                                    <TranslateTransform X="-8" Y="-1" />
                                </Rectangle.RenderTransform>
                            </Rectangle>
                        </Grid>

                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Thumb}" x:Key="bottomRightThumb" BasedOn="{StaticResource anyThumb}">
        <Setter Property="Width" Value="10" />
        <Setter Property="DockPanel.Dock" Value="Right" />
        <Setter Property="Cursor" Value="SizeNWSE" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border BorderThickness="0 1 0 0" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <Border.Resources>
                            <Style TargetType="{x:Type Rectangle}">
                                <Setter Property="Width" Value="2" />
                                <Setter Property="Height" Value="2" />
                            </Style>

                        </Border.Resources>
                        <DockPanel>
                            <Grid HorizontalAlignment="Right" VerticalAlignment="Stretch" DockPanel.Dock="Right" Cursor="SizeNWSE" Width="10">
                                <Rectangle  Fill="White">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="0" Y="1" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                                <Rectangle Fill="{StaticResource b1}">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="1" Y="0" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                                <Rectangle  Fill="White">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="0" Y="-3" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                                <Rectangle Fill="{StaticResource b1}">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="1" Y="-4" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                                <Rectangle  Fill="White">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="-4" Y="1" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                                <Rectangle Fill="{StaticResource b1}">
                                    <Rectangle.RenderTransform>
                                        <TranslateTransform X="-3" Y="0" />
                                    </Rectangle.RenderTransform>
                                </Rectangle>
                            </Grid>
                        </DockPanel>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>


</ResourceDictionary>